3.2.84 \(\int \frac {\cot (c+d x)}{(a+b \sin (c+d x))^2} \, dx\) [184]

Optimal. Leaf size=53 \[ \frac {\log (\sin (c+d x))}{a^2 d}-\frac {\log (a+b \sin (c+d x))}{a^2 d}+\frac {1}{a d (a+b \sin (c+d x))} \]

[Out]

ln(sin(d*x+c))/a^2/d-ln(a+b*sin(d*x+c))/a^2/d+1/a/d/(a+b*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2800, 46} \begin {gather*} -\frac {\log (a+b \sin (c+d x))}{a^2 d}+\frac {\log (\sin (c+d x))}{a^2 d}+\frac {1}{a d (a+b \sin (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]/(a + b*Sin[c + d*x])^2,x]

[Out]

Log[Sin[c + d*x]]/(a^2*d) - Log[a + b*Sin[c + d*x]]/(a^2*d) + 1/(a*d*(a + b*Sin[c + d*x]))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \frac {\cot (c+d x)}{(a+b \sin (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x (a+x)^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{a^2 x}-\frac {1}{a (a+x)^2}-\frac {1}{a^2 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\log (\sin (c+d x))}{a^2 d}-\frac {\log (a+b \sin (c+d x))}{a^2 d}+\frac {1}{a d (a+b \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 42, normalized size = 0.79 \begin {gather*} \frac {\log (\sin (c+d x))-\log (a+b \sin (c+d x))+\frac {a}{a+b \sin (c+d x)}}{a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]/(a + b*Sin[c + d*x])^2,x]

[Out]

(Log[Sin[c + d*x]] - Log[a + b*Sin[c + d*x]] + a/(a + b*Sin[c + d*x]))/(a^2*d)

________________________________________________________________________________________

Maple [A]
time = 0.18, size = 49, normalized size = 0.92

method result size
derivativedivides \(\frac {\frac {\ln \left (\sin \left (d x +c \right )\right )}{a^{2}}-\frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{a^{2}}+\frac {1}{a \left (a +b \sin \left (d x +c \right )\right )}}{d}\) \(49\)
default \(\frac {\frac {\ln \left (\sin \left (d x +c \right )\right )}{a^{2}}-\frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{a^{2}}+\frac {1}{a \left (a +b \sin \left (d x +c \right )\right )}}{d}\) \(49\)
risch \(\frac {2 i {\mathrm e}^{i \left (d x +c \right )}}{d a \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{a^{2} d}\) \(105\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)/(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/a^2*ln(sin(d*x+c))-1/a^2*ln(a+b*sin(d*x+c))+1/a/(a+b*sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 47, normalized size = 0.89 \begin {gather*} \frac {\frac {1}{a b \sin \left (d x + c\right ) + a^{2}} - \frac {\log \left (b \sin \left (d x + c\right ) + a\right )}{a^{2}} + \frac {\log \left (\sin \left (d x + c\right )\right )}{a^{2}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

(1/(a*b*sin(d*x + c) + a^2) - log(b*sin(d*x + c) + a)/a^2 + log(sin(d*x + c))/a^2)/d

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 69, normalized size = 1.30 \begin {gather*} -\frac {{\left (b \sin \left (d x + c\right ) + a\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - {\left (b \sin \left (d x + c\right ) + a\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) - a}{a^{2} b d \sin \left (d x + c\right ) + a^{3} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-((b*sin(d*x + c) + a)*log(b*sin(d*x + c) + a) - (b*sin(d*x + c) + a)*log(-1/2*sin(d*x + c)) - a)/(a^2*b*d*sin
(d*x + c) + a^3*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot {\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))**2,x)

[Out]

Integral(cot(c + d*x)/(a + b*sin(c + d*x))**2, x)

________________________________________________________________________________________

Giac [A]
time = 4.41, size = 51, normalized size = 0.96 \begin {gather*} \frac {b {\left (\frac {\log \left ({\left | -\frac {a}{b \sin \left (d x + c\right ) + a} + 1 \right |}\right )}{a^{2} b} + \frac {1}{{\left (b \sin \left (d x + c\right ) + a\right )} a b}\right )}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

b*(log(abs(-a/(b*sin(d*x + c) + a) + 1))/(a^2*b) + 1/((b*sin(d*x + c) + a)*a*b))/d

________________________________________________________________________________________

Mupad [B]
time = 6.38, size = 105, normalized size = 1.98 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{a^2\,d}-\frac {2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3+2\,b\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)/(a + b*sin(c + d*x))^2,x)

[Out]

log(tan(c/2 + (d*x)/2))/(a^2*d) - log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/2 + (d*x)/2)^2)/(a^2*d) - (2*b*tan(
c/2 + (d*x)/2))/(d*(a^3*tan(c/2 + (d*x)/2)^2 + a^3 + 2*a^2*b*tan(c/2 + (d*x)/2)))

________________________________________________________________________________________